<template>
	<view class="cardItem" :class="itemIndex==0?'first':''">
		<view class="cardItem_top">
			<view class="cardItem_top_right">
				<view class="cardItem_top_right_btn" :style='colorStatusType(Number(orderObj.status))'>
					{{statusMap[orderObj.status]}}
				</view>
			</view>
		</view>
		<view class="cardItem_infosContaines">
			<view class="cardItem_infosContaines_content">
				<!-- <view class="cardItem_infosContaines_content_item">
					<view class="cardItem_infosContaines_content_item_labelTwo ">
						订单明细ID
					</view>
					<view class="cardItem_infosContaines_content_item_title">
						{{orderObj.id}}
					</view>
				</view> -->
				<view class="cardItem_infosContaines_content_item">
					<view class="cardItem_infosContaines_content_item_label ">
						价格
					</view>
					<view class="cardItem_infosContaines_content_item_title">
						{{orderObj.amount}} 元
					</view>
				</view>
				<view class="cardItem_infosContaines_content_item" v-if="orderObj.refundAmount">
					<view class="cardItem_infosContaines_content_item_label ">
						退款金额
					</view>
					<view class="cardItem_infosContaines_content_item_title">
						{{orderObj.refundAmount}}
					</view>
				</view>
				<view class="cardItem_infosContaines_content_item" v-if="orderObj.refundSerialNumber">
					<view class="cardItem_infosContaines_content_item_label">
						退款订单流水号
					</view>
					<view class="cardItem_infosContaines_content_item_title">
						{{orderObj.refundSerialNumber}}
					</view>
				</view>
				<view class="cardItem_infosContaines_content_item" v-if="orderObj.serialNumber">
					<view class="cardItem_infosContaines_content_item_label ">
						订单流水号
					</view>
					<view class="cardItem_infosContaines_content_item_title">
						{{orderObj.serialNumber}}
					</view>
				</view>
				<view class="cardItem_infosContaines_content_item" v-if="orderObj.wxSerialNumber">
					<view class="cardItem_infosContaines_content_item_label ">
						微信订单流水号
					</view>
					<view class="cardItem_infosContaines_content_item_title">
						{{orderObj.wxSerialNumber}}
					</view>
				</view>
				<view class="cardItem_infosContaines_content_item" v-if="orderObj.payDateTime">
					<view class="cardItem_infosContaines_content_item_label ">
						订单日期
					</view>
					<view class="cardItem_infosContaines_content_item_title">
						{{orderObj.payDateTime}}
					</view>
				</view>
				<view class="cardItem_infosContaines_content_item" >
					<view class="cardItem_infosContaines_content_item_label ">
						支付方式
					</view>
					<view class="cardItem_infosContaines_content_item_title">
						{{orderObj.payMethod== 0 ? '微信' : '支付宝'}}
					</view>
				</view>
				
				
			</view>
		</view>
		
	</view>

</template>

<script>
	import {
		statusMap
	} from '@/utils/baseData.js'
	export default {
		name: "payDetailItem",
		props: ['orderObj', 'title', 'itemIndex'], //entranceType  1:专家介绍进入 2:特需会诊进入
		data() {
			return {
				statusMap:statusMap
			}
		},
		created() {

		},
		methods: {
			colorStatusType(item){
				switch (item) {
					case 2:
					return {
						'background-color': '#fdf6ec', 'border-color': '#00BF5B', color: '#00BF5B'
					} //success
					case 6:
						return {
							'background-color': '#fdf6ec', 'border-color': '#faecd8', color: '#266EFF'
						} //'warning'
					default:
						return {
							'background-color': '#FF4646', 'border-color': '#fde2e2', color: '#FFFFFF'
						} //danger
				}
			},

		}
	}
</script>

<style lang="scss" scoped>
	.redPrice {
		font-size: 28rpx;
		margin: 0 4rpx;
		color: red;
	}

	.color0 {
		background: linear-gradient(180deg, #5DDFFA 0%, #1E68E3 100%);
		color: #ffffff;
		background-clip: text;
		font-weight: 700;
		-webkit-background-clip: text;
		-webkit-text-fill-color: transparent;
		display: inline-block;
	}

	.color1 {
		background: linear-gradient(180deg, #4CE4D5 0%, #0FB6D2 100%);
		color: #ffffff;
		background-clip: text;
		font-weight: 700;
		-webkit-background-clip: text;
		-webkit-text-fill-color: transparent;
		display: inline-block;

	}

	.color2 {
		background: linear-gradient(180deg, #74ADFE 0%, #7E61EF 99%);
		color: #ffffff;
		font-weight: 700;
		background-clip: text;
		-webkit-background-clip: text;
		-webkit-text-fill-color: transparent;
		display: inline-block;

	}

	.color3 {
		background: linear-gradient(180deg, #4CE4D5 0%, #0FB6D2 100%);
		color: #ffffff;
		background-clip: text;
		font-weight: 700;
		-webkit-background-clip: text;
		-webkit-text-fill-color: transparent;
		display: inline-block;
	}

	.cardItem.first {
		margin-top: 0rpx;
	}

	.cardItem {
		position: relative;
		margin: 0 10rpx;
		padding: 16rpx 12rpx;
		box-shadow: 2rpx 2rpx 8rpx 8rpx rgba(32, 108, 228, 0.3);
		border-radius: 8rpx;
		margin-top: 48rpx;
		color: rgba(51, 51, 51, 1);

		&_top {
			display: flex;
			align-items: center;
			justify-content: space-between;
			line-height: 56rpx;

			&_left {
				display: flex;
				align-items: center;

				&_line {
					width: 6rpx;
					height: 32rpx;
					background: rgba(42, 139, 239, 1);
					border-radius: 4rpx;
					margin-right: 8rpx;
				}

				&_title {
					color: rgba(51, 51, 51, 1);
					font-size: 28rpx;
					font-weight: 600;
				}
			}

			&_right {
				display: flex;
				align-items: center;

				&_btn {
					padding: 0 6rpx;
					border-radius: 6rpx;
					margin-right: 8rpx;
					line-height: 40rpx;
					font-size: 26rpx;
					transform: scale(0.9);
					border: 2rpx solid #fff;
				}

				&_btn:last-child {
					margin: 0rpx;
				}

			}
		}

		&_price {
			color: rgba(42, 139, 239, 1);
			font-size: 28rpx;
			line-height: 40rpx;
			padding-left: 12rpx;
		}

		&_infosContaines {
			padding: 20rpx 12rpx;
			font-size: 26rpx;

			&_content {
				border-top: 2rpx solid rgba(197, 197, 197, 1);
				padding-top: 20rpx;

				&_item:first-child {
					margin-top: 0rpx;
				}

				&_item {
					margin-top: 10rpx;
					display: flex;
					font-size: 26rpx;
					line-height: 40rpx;

					&_label {
						color: #666666;
						width: 180rpx;
						margin-right: 12rpx;
					}
					&_labelTwo {
						color: #666666;
						width: 160rpx;
						margin-right: 12rpx;
					}

					&_title {
						color: #111111;

						&_infos {
							display: flex;
							flex-wrap: wrap;
							align-items: center;

							&_name {
								font-weight: 700;
							}

							&_line {
								width: 2rpx;
								height: 20rpx;
								background: rgba(168, 168, 168, 1);
								margin: 0 10rpx;
							}
						}
					}
				}
			}

		}

		&_bottom {
			&_btnGroup {
				display: flex;
				align-items: center;
				flex-wrap: wrap;

				&_item {
					padding: 10rpx;

					&_btn {
						cursor: pointer;
						padding: 2rpx 16rpx;
						height: 48rpx;
						font-size: 26rpx;
						line-height: 42rpx;
						border: 2rpx solid #266EFF;
						border-radius: 6rpx;
						color: #266EFF;
					}
				}
			}
		}
	}
</style>